package com.nian.search.solr.model;

import lombok.Data;
import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.annotation.Id;
import org.springframework.data.solr.core.mapping.SolrDocument;

import java.io.Serializable;

/**
 * 用途：
 * 开发：zhangmj
 * 日期：2020/4/14 0014 11:37
 */
@Data
@SolrDocument(collection = "item_core")
public class SolrItem implements Serializable {

    @Id
    @Field("id")
    private Long id;
    @Field(value = "title")
    private String title;
    @Field(value = "category")
    private String category;
    @Field(value = "brand")
    private String brand;
    @Field(value = "price")
    private Double price;
    @Field(value = "images")
    private String images;

    public SolrItem() {}

    public SolrItem(Long id, String title, String category, String brand, Double price, String images) {
        this.id = id;
        this.title = title;
        this.category = category;
        this.brand = brand;
        this.price = price;
        this.images = images;
    }
}
